/**
 * 乡镇一级的账号可以查所属县的所有机构
 * 市、县一级的账号可以查 该级别 和 其下地区 的所有机构
 * @param {*} user
 */
export const getQueryAddressCode = ({ orgRegionLever, queryAddressCode }) => {
  // 如果是乡镇，查其上一级的机构
  return +orgRegionLever === 4 ? queryAddressCode.substring(0, 6) + '000000' : queryAddressCode
}

const state = {
  creditAgencyTotal: 0,
}

const getters = {
  creditAgencyTotal: state => state.creditAgencyTotal,
}

const actions = {}

const mutations = {
  creditAgencyTotal: (state, payload) => (state.creditAgencyTotal = payload),
}

export default {
  state,
  getters,
  actions,
  mutations,
}
